@model Student

<!DOCTYPE html>
<html>
<head>
    <style>
        /* 添加表单容器样式 */
        .add-container {
            max-width: 600px;
            margin: 40px auto;
            padding: 20px;
            background: white;
            border-radius: 10px;
            box-shadow: 0 0 20px rgba(0,0,0,0.1);
        }

        /* 表单标题样式 */
        .form-title {
            text-align: center;
            color: #333;
            margin-bottom: 30px;
            font-size: 24px;
        }

        /* 表单组样式 */
        .form-group {
            margin-bottom: 20px;
        }

        /* 表单标签样式 */
        .form-label {
            display: block;
            margin-bottom: 8px;
            color: #555;
            font-weight: 500;
        }

        /* 表单输入框样式 */
        .form-input {
            width: 100%;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 16px;
            transition: border-color 0.3s;
        }

        /* 输入框焦点样式 */
        .form-input:focus {
            outline: none;
            border-color: #4CAF50;
            box-shadow: 0 0 5px rgba(76,175,80,0.2);
        }

        /* 按钮容器样式 */
        .btn-container {
            text-align: center;
            margin-top: 30px;
        }

        /* 按钮基础样式 */
        .btn {
            padding: 10px 20px;
            border: none;
            border-radius: 5px;
            font-size: 16px;
            cursor: pointer;
            transition: all 0.3s;
            margin: 0 10px;
        }

        /* 保存按钮样式 */
        .btn-save {
            background-color: #4CAF50;
            color: white;
        }

        /* 取消按钮样式 */
        .btn-cancel {
            background-color: #f44336;
            color: white;
        }

        /* 按钮悬停效果 */
        .btn:hover {
            opacity: 0.9;
            transform: translateY(-2px);
        }
    </style>
</head>
<body>
    @* 添加表单容器 *@
    <div class="add-container">
        <h2 class="form-title">添加新学生</h2>
        
        @* 添加表单 *@
        <form asp-action="Add" method="post">
            @* 姓名输入组 *@
            <div class="form-group">
                <label class="form-label" asp-for="StudentName">姓名</label>
                <input class="form-input" asp-for="StudentName" required />
            </div>

            @* 年龄输入组 *@
            <div class="form-group">
                <label class="form-label" asp-for="Age">年龄</label>
                <input class="form-input" asp-for="Age" type="number" required />
            </div>

            @* 地址输入组 *@
            <div class="form-group">
                <label class="form-label" asp-for="Address">地址</label>
                <input class="form-input" asp-for="Address" required />
            </div>

            @* 按钮组 *@
            <div class="btn-container">
                <button type="submit" class="btn btn-save">保存</button>
                <a asp-action="Index" class="btn btn-cancel">取消</a>
            </div>
        </form>
    </div>
</body>
</html>